program S2_2;
var a:array[1..30] of byte;
    count, i, cur, j, countmax:integer;

begin
for i:=1 to 30 do a[i]:=random(4)+6;
for i:=1 to 30 do write(a[i]:3);
writeln;
count:=1;
countmax:=count;
for i:=1 to 29 do begin
	if a[i]=a[i+1] then begin
		writeln('=== ',i,' ===');
		writeln('a[',i,']=a[',i+1,'] / ',a[i],'=',a[i+1]);
		if (count>1) and (a[i+1]=cur) then
			begin
			inc(count);
			writeln('c=',count);
			end
		else begin
			countmax:=count;
			writeln('countmax = ',count);
			cur:=a[i];
			count:=2;
			end;
		end;
	end;
writeln;
writeln('countmax=',countmax:2);
end.
